using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;

namespace SMS.WinForms.Controls
{
    public partial class WizardBannerPage : WizardPage
    {
        #region Constructors

        /// <summary>
        /// Initializes a new instance of the <see cref="WizardBannerPage"/> class.
        /// </summary>
        public WizardBannerPage()
        {
            InitializeComponent();
        }

        #endregion

        #region Events
        
        /// <summary>
        /// Handles the Paint event of the pnlBanner control.
        /// </summary>
        /// <param name="sender">The source of the event.</param>
        /// <param name="e">The <see cref="System.Windows.Forms.PaintEventArgs"/> instance containing the event data.</param>
        private void pnlBanner_Paint(object sender, PaintEventArgs e)
        {
            // Paint the border
            int heightValue = pnlBanner.Height - 2;
            e.Graphics.DrawLine(System.Drawing.SystemPens.ControlDark, 0, heightValue, pnlBanner.Width, heightValue);
            e.Graphics.DrawLine(System.Drawing.SystemPens.ControlLightLight, 0, heightValue + 1, pnlBanner.Width, heightValue + 1);
        }

        #endregion

        #region Properties

        /// <summary>
        /// Gets or sets the title.
        /// </summary>
        /// <value>The title.</value>
        [
            Category("Banner"),
            Description("The title displayed in the banner.")
        ]
        public String Title
        {
            get
            {
                return lblTitle.Text;
            }
            set
            {
                lblTitle.Text = value;
            }
        }

        /// <summary>
        /// Gets or sets the description.
        /// </summary>
        /// <value>The description.</value>
        [
            Category("Banner"),
            Description("The description displayed under the title in the banner.")
        ]
        public String Description
        {
            get
            {
                return lblDescription.Text;
            }
            set
            {
                lblDescription.Text = value;
            }
        }

        /// <summary>
        /// Gets or sets the banner image.
        /// </summary>
        /// <value>The banner image.</value>
        [
            Category("Banner"),
            Description("The image displayed in the background of the banner.")
        ]
        public Image BannerImage
        {
            get
            {
                return pnlBanner.BackgroundImage;
            }
            set
            {
                pnlBanner.BackgroundImage = value;
            }
        }

        #endregion
    }
}

